home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Looking for semaphore example.
- Date: Mon, 01 Apr 96 13:42:29 GMT
- Organization: none
- Message-ID: <828366149snz@genesis.demon.co.uk>
- References: <4jc5hd$1vlv@ilx018.iil.intel.com> <828220289snz@genesis.demon.co.uk> <4jlc0k$j02@solutions.solon.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4jlc0k$j02@solutions.solon.com>
- seebs@solutions.solon.com "Peter Seebach" writes:
-
- >In article <828220289snz@genesis.demon.co.uk>,
- >Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
- >>>Hi -
- >>>I'm looking for a simple example of implementation of semaphore in C .
- >
- >>Not possible - the C language doesn't support semaphores. You'll have
- >>to go beyond the C language to get this.
- >
- >Nonsense! You'll just need to go beyond the C language to implement
- >semaphores in a useful or meaningful way. :) You could easily implement
- >a semaphore algorithm in C, it just wouldn't matter in pure C, because
- >you'd only ever have the one process.
-
- In that case it isn't really a semaphore, just a flag that marks a
- particular region of execution.
-
- >Unless you wanted to implement software-level coprocesses or the like,
- >which you could do.
-
- Strictly conforming?
-
- I will defend my position to the last (and beyond)! :-)
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-